#include "LightSpot.h"



LightSpot::LightSpot(glm::vec3 _position, glm::vec3 _angles, glm::vec3 _color, glm::vec3 _direction):
	position(_position),
	angles(_angles),
	color(_color),
	direction(_direction),
	cosPhyInner(0.95f),
	cosPhyOuter(0.90f),
	ambient(1.0),
	diffuse(1.0),
	specular(1.0)
{
	updateDirection();
	constant = 1.0f;
	linear = 0.09f;
	quadratic = 0.032f;
}

LightSpot::~LightSpot()
{
}

void LightSpot::updateDirection()
{
	direction = glm::rotateZ(direction, angles.z);
	direction = glm::rotateX(direction, angles.x);
	direction = glm::rotateY(direction, angles.y);
}
